This invention concerns, generally, an electronic chip for a portable object such as a smartcard.
The smartcards are currently extremely successful. They are used in sectors as varied as banking, health, telephony, etc. The electronic chip in the smartcard incorporates one or more memories, in order to store data specific to the card user, such as a bank account number, the user""s social security number, the number of remaining telephone units, etc.
Some smartcards, in particular those used in the banking sector, include a microprocessor type processing circuit, including a source code capable of carrying out relatively complex operations. These operations consist, for example, of implementing encryption algorithms to protect secret information contained in the card, or organising data files. Generally, such operations are carried out after a command is sent by a card read and/or write terminal.
FIG. 1 illustrates a smartcard 1, including an electronic chip 1a, designed to co-operate with a terminal or read and/or write device 2. The terminal 2 can communicate with the electronic chip 1a, in particular to read or write data in it, when the card 1 is inserted in a slot 2a of the terminal provided for this purpose. In addition, the terminal 2 supplies the chip 1a with electrical power.
Consequently, once the connection is set up between the chip 1a and the terminal 2, the latter can send a command to the chip, such as a read command, to make it execute a particular processing operation. However, after sending the command, the terminal 2 expects the chip 1a to reply within a given time interval. If, on expiry of this time interval, the terminal 2 has not received any reply from the chip 1a, it generally considers that the latter is no longer operating or that it has been withdrawn from the terminal. The standard ISO 7816-3, concerning a transmission protocol for smartcards, defines a xe2x80x9cworking time-outxe2x80x9d corresponding to the maximum time allocated to the smartcard to reply to the terminal. On expiry of this working time-out, if it is still executing a processing operation, the card can transmit a restart byte to indicate to the terminal that it is still operating. Once the restart byte has been received by the terminal, the card has a further time interval before replying and can transmit other restart characters if necessary.
In conventional smartcards, the operation to transmit restart bytes is programmed in the microprocessor. To do this, commands are inserted at specific positions in the source code to be executed by the microprocessor. When, during a given processing operation, the microprocessor detects one of these commands, it interrupts the said processing to send a restart byte to the terminal.
This technique has a major disadvantage, since the time required for each operation to be carried out by the microprocessor must be planned in advance, i.e. when writing the source code. If, for example, the specific commands are too far apart from each other in the source code, the maximum response time authorised by the standard ISO 7816-3 may be exceeded during a processing operation which takes longer than planned to execute. In this case, there is a strong likelihood that the terminal, considering that the smartcard is not operating, switches off the electricity supply to the card, resulting in a possible loss of data or files in the card. If on the contrary the specific commands are too near each other in the source code, the microprocessor is obliged to interrupt the processing numerous times, which reduces the card execution speed.
Generally, it is extremely difficult to estimate the time required by the card microprocessor to execute the source code, since this time usually depends on initial, variable conditions.
In this context, it is easy to understand that there is a need for an electronic chip which can reply reliably to a terminal within an allocated time interval, without having too much impact on the speed of the processing operation(s) implemented by the chip.
The purpose of this invention, in particular, is to supply an electronic chip which can meet this requirement.
Consequently, an electronic chip is provided which comprises an interface enabling it to communicate with a terminal and a processing circuit capable of performing processing after a link has been set up between the chip and the terminal, characterised in that it also comprises a time base circuit, connected to the processing circuit, for generating a first signal during at least one given moment if processing has not yet been completed at the said moment, and a means of transmitting to the interface, in response to the first signal, a second signal with the purpose of indicating to the terminal that the chip is still operating.
Thus, according to this invention, the moment(s) when a restart signal must be sent to the terminal are determined by a time base circuit separate from the processing circuit. These moments are therefore independent of the processing duration implemented by the processing circuit, so that the terminal will receive restart signals in time, irrespective of the processing complexity.
In practice, the processing circuit is adapted to activate the time base circuit approximately at the start of the processing. xe2x80x9cApproximately at the start of the processingxe2x80x9d means that the processing circuit is activated shortly before or after the processing circuit starts to execute the processing. Similarly, the processing circuit is adapted to deactivate the time base circuit approximately at the end of the processing.
Typically, between the time when it is activated by the processing circuit and the time when it is deactivated, the time base circuit generates the first signal periodically. The time period between two successive transmissions, by the time base circuit, of the first signal is less than a predetermined response time, allocated to the electronic chip to reply to the terminal.
According to a first mode of realisation of this invention, the means of transmitting the second signal to the interface comprises the processing circuit, connected to the time base circuit so as to be able to receive the first signal. The processing circuit interrupts the processing in response to the reception of the first signal, transmits the second signal to the interface and then resumes the processing.
According to a second mode of realisation of this invention, the means of transmitting the second signal to the interface is separate from the processing circuit and includes for example an encoding circuit to convert the first signal, received from the time base circuit, into a signal which can be recognised by the terminal, forming the second signal. As a variant, the time base circuit and the encoding circuit form the same circuit so that the second signal is identical to the first signal.
Preferably, the second signal takes the form of a finite group of bits, such as a byte.
The processing circuit is usually a microprocessor. The time base circuit is therefore connected to a bus of the chip, to which the microprocessor and memories associated with it are also connected. According to the invention, the time base circuit is also connected to the microprocessor by a direct line, which can transmit the first signal of the time base circuit to the microprocessor and connected, in the microprocessor, to an interrupt input.
This invention also concerns a smartcard including the electronic chip as defined above.
According to another aspect of the invention, a method is planned to transmit a restart signal to a terminal from an electronic chip, the said electronic chip comprising a means enabling it to communicate with the terminal and a processing circuit, the method being characterised in that it comprises the following steps: set up a link between the electronic chip and the terminal, generate a first signal from a time base circuit connected to the processing circuit at least one given moment during processing carried out by the processing circuit and transmit to the terminal, in response to the first signal, a second signal with the purpose of indicating to the terminal that the chip is still operating.
Other features and advantages of this invention will appear on reading the detailed description which follows of several modes of realisation made in reference to the attached drawings;